/**
 * 
 */
package com.oet.persistence.operator;

import javax.persistence.EntityManager;

import com.oet.persistence.entity.Course;
import com.oet.persistence.entity.CourseFile;
import com.oet.persistence.entity.CourseNews;
import com.oet.persistence.entity.CourseSeries;
import com.persistence.template.EntityOperator;


/**
 * @author y140zhan
 *
 */
public class CourseNewsEntity extends EntityOperator<CourseNews> {
	
	public CourseNewsEntity(EntityManager em)
	{
		setEntityManager(em);
		validate();
		getInstance();
	}
	
	public CourseNewsEntity(EntityManager em, Object id)
	{
		setEntityManager(em);
		validate();
		getInstance();
		loadInstance(id);
	}
	
	public CourseNews loadEntity(Object id)
	{
		return loadInstance(id);
	}
	
	public String remove()
	{
		CourseNews instanceTemp = getInstance();
		getEntityManager().refresh(instanceTemp);

		return super.remove();
	}

}
